<!--
 * @Description: 
 * @Autor: 商晓彬
 * @Date: 2021-05-24 15:13:54
 * @LastEditors: 商晓彬
 * @LastEditTime: 2021-09-28 10:11:26
-->
<div bsModal #createOrEditModal="bs-modal" (onShown)="onShown()" class="modal fade" tabindex="-1" role="dialog"
    aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{backdrop: 'static', keyboard: !saving}">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <form *ngIf="active" #bopForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span>{{title}}</span>
                    </h4>
                    <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')"
                        [disabled]="saving">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body" >
                    <div class="form-group" style="display: flex;">
                        <label for="model" style="margin-top: 7px;margin-right: 20px;">* 仓库名称:</label>
                         <input  style=" width:150px;height: 35px;margin-right: 10px;" id="stroeName" #modelInput="ngModel" type="text" name="stroeName" 
                            [(ngModel)]="form.stroeName" required maxlength="256" class="form-control" />
                        <validation-messages [formCtrl]="modelInput"></validation-messages>
                        <label for="lotNo" style="margin-top: 7px;margin-right: 20px;margin-left: 100px;">*仓库类型:</label>
                        <p-dropdown filter="true" dataKey="value" [optionLabel]="'label'" required name="lotNo" #lotNoInput="ngModel"
                        [options]="stroeTypeNameOptions" [(ngModel)]="stroeTyp" placeholder="请选择" emptyFilterMessage="暂无数据">
                        </p-dropdown>
                        <!-- <input style=" width:150px;height: 35px;margin-right: 10px;" id="stroeTypeName" #lotNoInput="ngModel" type="text" name="stroeTypeName"
                            [(ngModel)]="" required maxlength="256" class="form-control" /> -->
                        <validation-messages [formCtrl]="lotNoInput"></validation-messages>
                    </div>
                    <div class="form-group" style="display: flex;">
                        <!-- <label for="modelName" style="margin-top: 7px;margin-right: 20px;">*仓库编号:</label>
                        <input id="modelName" style=" width:150px;height: 35px;margin-right: 10px;" #modelNameInput="ngModel" type="text" name="modelName"
                            class="form-control" [(ngModel)]="form.modelName" required maxlength="256" />
                        <validation-messages [formCtrl]="modelNameInput"></validation-messages> -->
                        <label for="isOpen" style="margin-top: 7px;margin-right: 20px;">* 启用仓库:</label>
                        <p-toggleButton name="isOpen" [(ngModel)]="isOpen"
                                [style]="{'width':'150px'}" onLabel="启用" offLabel="停用"></p-toggleButton>
                    </div>
                    <div class="form-group" style="display: flex;">
                        <label for="remark" style="margin-top: 7px;margin-right: 20px;width: 63.58px;">备 注：</label>
                        <input id="remark" style=" width:543px;height: 35px;margin-right: 10px;" type="text" name="remark"
                            class="form-control" [(ngModel)]="form.remark" maxlength="256" />
                    </div>
                </div>
                <div class="modal-footer">
                    <button [disabled]="saving" type="button" class="btn btn-default" (click)="close()">取消</button>
                    <button type="submit" class="btn btn-primary" [disabled]="!bopForm.form.valid" [buttonBusy]="saving"
                        [busyText]="l('SavingWithThreeDot')"><i class="fa fa-save"></i> <span>保存</span></button>
                </div>
            </form>
        </div>
    </div>
</div>